package com.test.metric.queue;

import java.util.UUID;
import java.util.concurrent.BlockingQueue;

public class MetricPusher implements Runnable{

	private final BlockingQueue<String> queue;
	
	public MetricPusher(BlockingQueue<String> queue){
		this.queue=queue;
	}
	
	public void run() {
		while (true) {
			try {
				String data = UUID.randomUUID().toString();
				System.out.println("Push: " + data);
				queue.put(data);
				Thread.sleep(1200);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}

}
}

